package com.ethink.warehouse.common.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ethink.warehouse.api.info.LogisticsTransferOrderInfo;
import com.ethink.warehouse.api.request.LogisticsTransferOrderQueryItemModeRequest;
import com.ethink.warehouse.api.request.LogisticsTransferOrderQueryRequest;
import com.ethink.warehouse.api.response.LogisticsTransferOrderQueryItemModeResponse;
import com.ethink.warehouse.api.response.LogisticsTransferOrderQueryResponse;
import com.ethink.warehouse.common.entity.LogisticsTransferOrder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 物流调拨单 Mapper接口
 *
 * @author default
 * @date 2022-11-10
 */
@Mapper
public interface LogisticsTransferOrderMapper extends BaseMapper<LogisticsTransferOrder> {

    /**
     * 分页查询
     *
     * @param buildPage
     * @param request
     * @return
     */
    Page<LogisticsTransferOrderQueryResponse> queryLogisticsTransferOrder(Page buildPage, @Param("request") LogisticsTransferOrderQueryRequest request);

    LogisticsTransferOrderQueryResponse queryLogisticsTransferOrderSum(@Param("request") LogisticsTransferOrderQueryRequest request);

    /**
     * 详情
     *
     * @param id
     * @return
     */
    LogisticsTransferOrderInfo getLogisticsTransferOrderById(@Param("id") Long id);

    /**
     * 完成订单
     *
     * @param request
     */
    void updateLogisticsTransferOrderStatus(@Param("request") List<String> request);

    /**
     * 货品模式分页查询
     *
     * @param buildPage
     * @param request
     * @return
     */
    Page<LogisticsTransferOrderQueryItemModeResponse> queryItemModeLogisticsTransferOrder(Page buildPage, @Param("request") LogisticsTransferOrderQueryItemModeRequest request);
}